using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeocodingTools
{
    /// <summary>
    /// <para>Create Composite Address Locator</para>
    /// <para>Creates a composite address locator. A composite locator consists of two or more individual  locators that allow addresses to be matched against the multiple locators.</para>
    /// <para>创建复合地址定位器。复合定位器由两个或多个单独的定位器组成，这些定位器允许将地址与多个定位器进行匹配。</para>
    /// </summary>    
    [DisplayName("Create Composite Address Locator")]
    public class CreateCompositeAddressLocator : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateCompositeAddressLocator()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_address_locators">
        /// <para>Address Locators</para>
        /// <para><xdoc>
        ///   <para>The order of the participating address locators determines how candidates are searched and an address is matched. When you geocode a single address, the address will be matched against all participating address locators unless the locator is specified with a selection criterion. All the found candidates will be displayed based on the order of the listed participating address locators. If you geocode a table of addresses, addresses are matched automatically to the first best candidate found from the first participating address locators. If the address fails to match, it will fall back to the subsequent locator in the list.</para>
        ///   <para>A reference name for each participating locator is required. This is the name of the locator referred to by the composite locator. The name should contain no space or special symbols. The maximum length of the name is 14 characters.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>参与地址定位器的顺序决定了如何搜索候选人和匹配地址。对单个地址进行地理编码时，该地址将与所有参与的地址定位器进行匹配，除非使用选择条件指定了定位器。所有找到的候选人将根据列出的参与地址定位器的顺序显示。如果对地址表进行地理编码，则地址将自动与从第一个参与地址定位器中找到的第一个最佳候选者进行匹配。如果地址不匹配，它将回退到列表中的后续定位器。</para>
        ///   <para>每个参与定位器的参考名称是必需的。这是复合定位器所引用的定位器的名称。名称不应包含空格或特殊符号。名称的最大长度为 14 个字符。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_field_map">
        /// <para>Field Map</para>
        /// <para><xdoc>
        ///   <para>The mapping of input fields used by each participating locator to the input fields of the composite locator.</para>
        ///   <para>The fields and field contents that are generated by the participating locators. Each of the unique input fields is listed on the Field Map section, and when expanded, you will see a list of all the input field occurrences (subfields) for each participating address locator. These fields are the input fields for the composite address locator. If there are duplicate fields such as ZIP and Postcode because of the unique names populated from the participating address locators, you may group the subfields by dragging and dropping them to the appropriate Field or use the Arrow Up or Arrow Down button to move the subfield.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每个参与定位器使用的输入字段到复合定位器的输入字段的映射。</para>
        ///   <para>参与定位器生成的字段和字段内容。每个唯一的输入字段都列在字段映射部分中，展开后，您将看到每个参与地址定位器的所有输入字段匹配项（子字段）的列表。这些字段是复合地址定位器的输入字段。如果由于参与的地址定位器填充的唯一名称而存在重复字段（如邮政编码），则可以通过将子字段拖放到相应的字段或使用向上箭头或向下箭头按钮移动子字段来对子字段进行分组。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_composite_address_locator">
        /// <para>Output Composite Address Locator</para>
        /// <para>The composite address locator to create. ArcGIS Pro only supports saving locators in a file folder.</para>
        /// <para>要创建的复合地址定位器。ArcGIS Pro 仅支持将定位器保存在文件夹中。</para>
        /// </param>
        public CreateCompositeAddressLocator(object _in_address_locators, object _in_field_map, object _out_composite_address_locator)
        {
            this._in_address_locators = _in_address_locators;
            this._in_field_map = _in_field_map;
            this._out_composite_address_locator = _out_composite_address_locator;
        }
        public override string ToolboxName => "Geocoding Tools";

        public override string ToolName => "Create Composite Address Locator";

        public override string CallName => "geocoding.CreateCompositeAddressLocator";

        public override List<string> AcceptEnvironments => ["configKeyword", "outputCoordinateSystem"];

        public override object[] ParameterInfo => [_in_address_locators, _in_field_map, _in_selection_criteria, _out_composite_address_locator];

        /// <summary>
        /// <para>Address Locators</para>
        /// <para><xdoc>
        ///   <para>The order of the participating address locators determines how candidates are searched and an address is matched. When you geocode a single address, the address will be matched against all participating address locators unless the locator is specified with a selection criterion. All the found candidates will be displayed based on the order of the listed participating address locators. If you geocode a table of addresses, addresses are matched automatically to the first best candidate found from the first participating address locators. If the address fails to match, it will fall back to the subsequent locator in the list.</para>
        ///   <para>A reference name for each participating locator is required. This is the name of the locator referred to by the composite locator. The name should contain no space or special symbols. The maximum length of the name is 14 characters.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>参与地址定位器的顺序决定了如何搜索候选人和匹配地址。对单个地址进行地理编码时，该地址将与所有参与的地址定位器进行匹配，除非使用选择条件指定了定位器。所有找到的候选人将根据列出的参与地址定位器的顺序显示。如果对地址表进行地理编码，则地址将自动与从第一个参与地址定位器中找到的第一个最佳候选者进行匹配。如果地址不匹配，它将回退到列表中的后续定位器。</para>
        ///   <para>每个参与定位器的参考名称是必需的。这是复合定位器所引用的定位器的名称。名称不应包含空格或特殊符号。名称的最大长度为 14 个字符。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Address Locators")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_address_locators { get; set; }


        /// <summary>
        /// <para>Field Map</para>
        /// <para><xdoc>
        ///   <para>The mapping of input fields used by each participating locator to the input fields of the composite locator.</para>
        ///   <para>The fields and field contents that are generated by the participating locators. Each of the unique input fields is listed on the Field Map section, and when expanded, you will see a list of all the input field occurrences (subfields) for each participating address locator. These fields are the input fields for the composite address locator. If there are duplicate fields such as ZIP and Postcode because of the unique names populated from the participating address locators, you may group the subfields by dragging and dropping them to the appropriate Field or use the Arrow Up or Arrow Down button to move the subfield.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每个参与定位器使用的输入字段到复合定位器的输入字段的映射。</para>
        ///   <para>参与定位器生成的字段和字段内容。每个唯一的输入字段都列在字段映射部分中，展开后，您将看到每个参与地址定位器的所有输入字段匹配项（子字段）的列表。这些字段是复合地址定位器的输入字段。如果由于参与的地址定位器填充的唯一名称而存在重复字段（如邮政编码），则可以通过将子字段拖放到相应的字段或使用向上箭头或向下箭头按钮移动子字段来对子字段进行分组。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_field_map { get; set; }


        /// <summary>
        /// <para>Selection criteria</para>
        /// <para><xdoc>
        ///   <para>Selection criteria for each participating locator. Only one selection criterion is supported for each participating locator.</para>
        ///   <para>When building a composite address locator, you may wish to specify which address locators are used based on the values of input address fields. For example, if your composite address locator uses a locator that contains street data for a specific city, you may want to filter out any addresses that do not have that particular city name. Using selection criteria will disqualify participating address locators that do not meet the criteria on a particular address so that the geocoding process will be more efficient. For instance, if a street address locator is specified with a selection criterion as "City" = 'Atlanta', only addresses that contain the city name "Atlanta" will be geocoded against this locator.</para>
        ///   <para>To specify a selection criterion, click the box under the Selection Criteria column next to the address locator you want to apply the criterion. You can enter an expression such as "City" = 'Atlanta' in the text box or click the ... button to open the Specify Locator Selection Criteria dialog box and define the criteria.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每个参与定位器的选择标准。每个参与定位器仅支持一个选择标准。</para>
        ///   <para>构建复合地址定位器时，您可能希望根据输入地址字段的值指定使用哪些地址定位器。例如，如果复合地址定位器使用包含特定城市街道数据的定位器，则可能需要过滤掉没有该特定城市名称的任何地址。使用选择标准将取消不符合特定地址条件的参与地址定位器的资格，以便地理编码过程更加高效。例如，如果街道地址定位器的选择条件为“City” = 'Atlanta'，则仅包含城市名称“Atlanta”的地址才会根据此定位器进行地理编码。</para>
        ///   <para>要指定选择条件，请单击要应用条件的地址定位器旁边的“选择条件”列下的框。您可以在文本框中输入表达式，例如“City” = 'Atlanta'，或单击 ...按钮打开指定定位器选择条件对话框并定义条件。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Selection criteria")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_selection_criteria { get; set; } = null;


        /// <summary>
        /// <para>Output Composite Address Locator</para>
        /// <para>The composite address locator to create. ArcGIS Pro only supports saving locators in a file folder.</para>
        /// <para>要创建的复合地址定位器。ArcGIS Pro 仅支持将定位器保存在文件夹中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Composite Address Locator")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_composite_address_locator { get; set; }


        public CreateCompositeAddressLocator SetEnv(object configKeyword = null, object outputCoordinateSystem = null)
        {
            base.SetEnv(configKeyword: configKeyword, outputCoordinateSystem: outputCoordinateSystem);
            return this;
        }

    }

}